package demo1;

public class Sub extends Base{
    /*protected int z;

    public Sub(int x, int y, int z) {
        super(x, y);
        System.out.println((x * y * z));
    }

    public void calculate() {
        System.out.println((super.x * super.y * this.z));
    }*/

    private int z;

    public Sub(int x, int y, int z) {
        //write your code here
        super(x,y);
        System.out.println((x * y * z));
    }

    public int getZ() {
        return z;
    }

    public int calculate() {
        return super.getX() * super.getY() * this.getZ();
    }

}
